package com.reggie.service.impl;

import com.reggie.dao.UserDao;
import com.reggie.pojo.User;
import com.reggie.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UserServiceImpl implements UserService {
    @Autowired
    private UserDao dao;
    @Override
    public User selectByEmail(String Email) {
        User user = dao.selectByEmail(Email);
        return user;
    }

    @Override
    public void add(User user) {
        dao.insert(user);
    }

    @Override
    public User selectById(Long id) {
        return dao.selectById(id);
    }
}
